package main

/*
 * game server main.
 */

import (
	"GameServer/framework"
	log "myLog"
	"os"
)

func main() {
	if len(os.Args) <= 1 {
		os.Args = append(os.Args, "./bin")
	}

	// framework.
	var frameWork framework.FrameWork

	// Initialize the framework.
	if err := frameWork.Init(os.Args[1]); err != nil {
		return
	}

	// Start net module.
	if err := frameWork.StartListen(); err != nil {
		return
	}

	// Log out.
	log.Infof("GameServer start ok.")

	// run.
	frameWork.Run()

	// release
	frameWork.Release()
}
